<div id="content">  

<? if($this->input->post("submit_action") !== FALSE){ ?>
    <div class="response"><?=validation_errors()?></div>                
<? } ?>

<? if(is_array($response)){?>
    <div class="response">
        <span class="<?=$response["class"]?>"><?=$response["msg"]?></span>
    </div>
<?}?>

    <? if(!is_array($response)){?>
    <div class="float_block_right">
        <a style="float:right; margin-left:5px" href="<?=site_url('admin/finishes')?>" class="button">CANCEL</a>
    </div>
    <? }?> 
     

    <h1>Product finish type: <i><?=$item['Name_Finishes']?></i></h1>

    <? if(!is_array($response)){?>
    <div class="content_block">
    <form action="" method="post">
        <input type="text" name="name" maxlength="80" style="display:inline; width:200px" value="<?=set_value('name', $item['Name_Finishes'])?>" />
        <input type="submit" class="button" name="submit_action" value="UPDATE" />
    </form>
    </div>
    <? }?> 

    <div class="content_block" style="width:100%">
    <? if(!empty($products)){?>    
        <h3>Products using this Finish type:</h3>
        <div class="hr"></div>
        <div class="live_search_msg"></div>
        <? foreach($products as $prod){?>
            <div class="product_block search <?=($prod['Active_Products']==1)?'active':'inactive'?>">    
                <img src="<?=thumbnail(base_url().UPLOADS_FOLDER.PRODUCT_IMG_FOLDER.$prod['Main_Image'])?>" />
                <span class="title">
                    <?=$prod['Name_Products']?>
                </span>
            </div>
        <? } ?>
    <? } else { ?>
        <h3>This Finish type is not being used by any Products</h3>
    <? } ?>
    </div>

</div>